home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / MFC / include / wcebar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-02-19  |  2.0 KB  |  68 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. #ifndef __WCEBAR_H__
  12. #define __WCEBAR_H__
  13.  
  14. #define CMDBAR_END (WORD)-1
  15.  
  16. #if !defined(_WIN32_WCE_NO_CONTROLBARS)
  17.  
  18. class CCeCommandBar : public CToolBar
  19. {
  20.     DECLARE_DYNAMIC(CCeCommandBar)
  21.  
  22.     // Attributes
  23. public:
  24.  
  25. // Constructors
  26. public:
  27.     CCeCommandBar();
  28.     virtual ~CCeCommandBar();
  29.     void ResetCommandBar();
  30.  
  31. // Operations
  32.     CComboBox* InsertComboBox(int nWidth, WORD idComboBox,
  33.                               int nButton = CMDBAR_END, 
  34.                               DWORD dwStyle = CBS_DROPDOWNLIST | WS_VSCROLL);
  35.  
  36.     CMenu* InsertMenuBar(UINT nResourceID, int nButton = CMDBAR_END)
  37.         { return InsertMenuBar(MAKEINTRESOURCE(nResourceID), nButton); }
  38.     CMenu* InsertMenuBar(LPCTSTR lpszMenuName, int nButton = CMDBAR_END);
  39.     CMenu* GetMenuBar(int nButton) const; 
  40.     BOOL   DrawMenuBar(int nButton) const;
  41.  
  42.     BOOL   AddAdornments(DWORD dwFlags = 0);
  43.     BOOL   InsertSeparator(int nWidth = 6, int nButton = CMDBAR_END);
  44.     void   WrapAtButton(int nButton);
  45.  
  46.     int    GetNumButtons() const 
  47.         { return ::SendMessage(m_hWnd, TB_BUTTONCOUNT, 0, 0); }
  48.  
  49. private:
  50.     void RemoveCustomControls();
  51.     void SetToCustomControlButton(int nButton);
  52.     static BOOL IsCustomControlButton(const TBBUTTON& button);
  53.     static CCeCommandBar* GetDefaultCommandBar(CFrameWnd *, BOOL bAutoCreateMenu = TRUE);
  54.  
  55.     CObArray m_pComboBoxArray;
  56.     CObArray m_pMenuArray;
  57.     BOOL     m_bAppendBitmaps;
  58.     BOOL     m_bAdornmentsAdded;
  59.     HWND     m_hBCComboBox; // Use for backward compatibility only
  60.  
  61.     friend class CFrameWnd; // Used for old command bar function support.
  62.     friend class CToolBar;
  63. };
  64.  
  65. #endif // _WIN32_WCE_NO_CONTROLBARS
  66.  
  67. #endif // __WCEBAR_H__
  68.